package com.byhealth.spus.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.byhealth.act.base.base.DataAccessController;
import com.byhealth.act.base.model.ApiModel;
import com.byhealth.spus.service.TestService;

@Controller
public class TestController extends DataAccessController{
	
	@Autowired
	public TestService test;

	@SuppressWarnings("unchecked")
	@RequestMapping
	@ResponseBody
	public ApiModel<Object> test(){
		try {
			return buildSuccMsg(test.test());
		} catch (Exception e) {
			e.printStackTrace();
			return buildSuccMsg(e);
		}
	}
}
